<template>
  <div id="app">
    <keep-alive>
      <router-view class="view-router" :key="$route.fullPath" v-if="$route.meta.keepAlive"></router-view>
    </keep-alive>
    <router-view class="view-router" :key="$route.fullPath" v-if="!$route.meta.keepAlive"></router-view>
    <!-- <router-view name="footer"></router-view> -->
    <videoView ref="videoDom"></videoView>
    <loginView ref="loginDom"></loginView>
    <el-backtop></el-backtop>
  </div>
</template>

<script>
import DevicePixelRatio from '@/common/devicePixelRatio'
import videoView from '@/components/videoView'
import loginView from '@/components/loginView'
export default {
  data() {
    return {}
  },
  components: {
    videoView,
    loginView
  },
  mounted() {
    new DevicePixelRatio().init()

    //this.eventBus.$emit('openVideo', {title:'111',url:''})
    this.eventBus.$on('openVideo', data => {
      this.$refs.videoDom.openVideo(data.url, data.title)
    })
    this.eventBus.$on('openLogin', () => {
      this.$refs.loginDom.open()
    })
  }
}
</script>

<style></style>
